Nested p2m: implement "flush" as a first-class action
authorTim Deegan <Tim.Deegan@citrix.com>
Thu, 30 Jun 2011 09:26:54 +0000 (10:26 +0100)
committerTim Deegan <Tim.Deegan@citrix.com>
Thu, 30 Jun 2011 09:26:54 +0000 (10:26 +0100)
commit67a0e20164419a5d26ca1cc067b4899df2a8d382
tree03001b7c1148296dd9a618222523f8b2f19b9368
parent7e9ee87b3ec2158a9ac4e0dda838f177dcde92dd
Nested p2m: implement "flush" as a first-class action
rather than using the teardown and init functions.
This makes the locking clearer and avoids an expensive scan of all
pfns that's only needed for non-nested p2ms.  It also moves the
tlb flush into the proper place in the flush logic, avoiding a
possible race against other CPUs.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Acked-by: Christoph Egger <Christoph.Egger@amd.com>
xen/arch/x86/hvm/nestedhvm.c
xen/arch/x86/mm/p2m.c
xen/include/asm-x86/hvm/nestedhvm.h